nav.navbar.navbar-expand-md.navbar-dark.fixed-top.bg-dark
  a.navbar-brand(href='/') Node.js Express Mongoose Demo
  button.navbar-toggler(type='button' data-toggle='collapse' data-target='#navbarCollapse' aria-controls='navbarCollapse' aria-expanded='false' aria-label='Toggle navigation')
    span.navbar-toggler-icon
  #navbarCollapse.collapse.navbar-collapse
    ul.navbar-nav.mr-auto
      li(class=isActive('/articles/new') ? 'active nav-item' : 'nav-item')
        a.nav-link(href="/articles/new", title="new article") New
      - if (req.isAuthenticated())
        li.nav-item(class=isActive(`/users/${req.user.id}`) && 'active')
          a.nav-link(href="/users/"+req.user.id, title="Profile") Profile
        li.nav-item
          a.nav-link(href="/logout", title="logout") Logout
      - else
        li(class=isActive('/login') ? 'active nav-item' : 'nav-item')
          a.nav-link(href="/login", title="Login") Login

    ul.nav.navbar-nav.navbar-right
      li.nav-item
        iframe(src="//ghbtns.com/github-btn.html?user=madhums&repo=node-express-mongoose-demo&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="120", height="45", style="padding: 15px 0 0 15px;")
      li.nav-item
        iframe(src="//ghbtns.com/github-btn.html?user=madhums&repo=node-express-mongoose-demo&type=fork&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="120", height="45", style="padding: 15px 0 0 15px;")
      li.nav-item
        a.nav-link(href='https://travis-ci.org/madhums/node-express-mongoose-demo')
          img(src='https://img.shields.io/travis/madhums/node-express-mongoose-demo/master.svg?style=flat', alt='Build Status', data-canonical-src='https://img.shields.io/travis/madhums/node-express-mongoose-demo.svg?style=flat', style='max-width:100%;')
